home *** CD-ROM | disk | FTP | other *** search
Wrap
bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) NNNNAAAAMMMMEEEE bufview - file system buffer cache activity monitor SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _b_u_f_v_i_e_w [ -_o_p_t_i_o_n_s ] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _b_u_f_v_i_e_w displays periodic information about the file system buffer cache. It is modeled after the program _t_o_p(1) which displays information about running processes. OOOOPPPPTTTTIIIIOOOONNNNSSSS ----bbbb Use batch (or non-interactive mode). ----ssss ddddeeeellllaaaayyyy Wait _d_e_l_a_y seconds between updates. The default is 3 seconds. ----dddd ccccoooouuuunnnntttt Update the display _c_o_u_n_t times and then exit. The default is to continually update. ----nnnn lllliiiinnnneeeessss Display only _l_i_n_e_s number of buffers. The default is to display as many buffers as will fit the screen when in interactive mode, or all buffers when in batch mode. ----ffff ffffllllaaaaggggssss Only display buffers which have the specified _f_l_a_g_s bits set. ----oooo oooorrrrddddeeeerrrr display buffers using the specified sort order. ----SSSS Do not display system buffers. ----DDDD Do not display data buffers. IIIINNNNTTTTEEEERRRRAAAACCCCTTTTIIIIVVVVEEEE MMMMOOOODDDDEEEE _b_u_f_v_i_e_w accepts display commands interactively. These commands are currently recognized: ^^^^LLLL Redraw the screen. hhhh or ???? Display a summary of the commands (help screen). qqqq Quit. ssss Change number of seconds to delay between updates. SSSS Toggle display of system buffers on or off. PPPPaaaaggggeeee 1111 bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) DDDD Toggle display of file data buffers on or off. oooo Specify buffer display order (see details below). ffff Display only buffers with specific state flags set (see details below). FFFF Ignore buffer state flags when determining which buffers to display. mmmm Display only buffers from the specified device (mounted file system). MMMM Display buffers from all mounted file systems. This is the default behaviour. FFFFIIIILLLLEEEE SSSSYYYYSSSSTTTTEEEEMMMM BBBBUUUUFFFFFFFFEEEERRRRSSSS There are a set number of buffer headers allocated by the system when it starts up, but the memory attached to each buffer changes over time. In the Irix operating system, a distinction is made between data buffers, which hold the data from regular files, and system or meta-data buffers, which hold the file system control data, such as directories, inodes and file system mapping information. The file system buffer cache is integrated with the memory page allocator. Any pages which contain file system data are remembered; if the pages are released from a buffer header because the buffer is asked to represent different data, the pages can be reclaimed by another buffer later if the pages haven't been reused in the meantime. Thus pages of memory which hold file data can be: attached to buffers; or attached to one or more user processes (see mmmmmmmmaaaapppp((((2222))))), separately or at the same time; or on the free page list. GGGGLLLLOOOOBBBBAAAALLLL IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN The first few lines of the display monitor system-wide statistics. These include buffer counts, memory values, events and time values. The total number of buffers is displayed as _B_u_f_s; at any moment, each of these buffers is accounted for as either _S_y_s, _D_a_t_a, _E_m_p_t_y or _I_n_a_c_t. Sys means that the buffer contains file system meta-data; a Data buffer hold regular file data. Empty implies that the buffer does not have any data stored at the moment; Inact means that the buffer is empty and has been removed from use temporarily to avoid having the buffer cache use too much memory. The total amount of system memory is displayed as _M_e_m. The amount of memory associated with Sys and Data buffers is displayed as _S_M_e_m and _D_M_e_m. The current amount of free memory is displayed as _M_F_r_e_e; the portion of that memory that holds (reclaimable) file system data is shown as _M_F_r_e_D. PPPPaaaaggggeeee 2222 bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) Various system memory limiters are also shown. The operating system avoids having the amount of memory in Data buffers grow too large. To such end, the system tuneable parameter, mmmmiiiinnnn____ffffrrrreeeeeeee____ppppaaaaggggeeeessss, specifies how many pages should be on the free list. If there are fewer, the Data buffers will be trimmed, but only as low as mmmmiiiinnnn____ffffiiiilllleeee____ppppaaaaggggeeeessss (see ssssyyyyssssttttuuuunnnneeee((((1111))))). mmmmiiiinnnn____ffffiiiilllleeee____ppppaaaaggggeeeessss and mmmmiiiinnnn____ffffrrrreeeeeeee____ppppaaaaggggeeeessss are shown, as memory amounts, in _D_M_i_n and _F_r_M_i_n. There are two other limits to the amount of memory the buffer Data cache can use. There are two system counters known as aaaavvvvaaaaiiiillllrrrrmmmmeeeemmmm and aaaavvvvaaaaiiiillllssssmmmmeeeemmmm, which indicate, respectively, how many physical pages would be available if push came to shove (that is, if the system paging daemon were to push every possible user page out of memory and in to backing store); and how many pages of memory and backing store (swap) have not been reserved by programs and the kernel. These two counters are expressed as memory amounts by _M_a_x_R and _M_a_x_S. In the 6.5 operating system release, Data buffer pages are not accounted for in either aaaavvvvaaaaiiiillllrrrrmmmmeeeemmmm or aaaavvvvaaaaiiiillllssssmmmmeeeemmmm, but since the Data cache can never be forced to drop below mmmmiiiinnnn____ffffiiiilllleeee____ppppaaaaggggeeeessss, the system must ensure that: first, neither aaaavvvvaaaaiiiillllrrrrmmmmeeeemmmm nor aaaavvvvaaaaiiiillllssssmmmmeeeemmmm drop below mmmmiiiinnnn____ffffiiiilllleeee____ppppaaaaggggeeeessss; and second, that if the Data cache grows beyond mmmmiiiinnnn____ffffiiiilllleeee____ppppaaaaggggeeeessss, it does not grow beyond the avail counters. These values are displayed as a diagnostic tool to help understand whether there are enough buffers allocated for the system, whether the cache is responding well enough to various memory pressures, and whether the tuneable parameters are configured sanely. If the buffer cache memory must be trimmed, individual buffer headers are inactivated. Inactivated buffers, displayed as _I_n_a_c_t are those which are both trimmed of their memory and also removed from the buffer free lists so that won't be immediately refilled to represent other file system data. When the system decides that the amount of memory allocated to buffers can grow, and there are no empty buffers available, inactive buffers are activated (put back on a free list). Some event counters are also shown. The number of times a buffer is inactivated is shown as _d_e_a_c_t; conversly, reactivations are shown as _r_e_a_c_t. The number of times a particular buffer is sought is given as _g_t_b_l_k; the times a sought buffer is found in the cache is _f_o_u_n_d. If a particular buffer isn't found in the buffer cache, a buffer free list is searched for the first available buffer that can be reclaimed. Buffers that have delayed write data or that have special release functions associated with them are not directly acquired in the search for available buffers; instead they are written (_w_r_i_t_e) or the release function is called (_r_e_l_s_e), and skipped. Buffers have a counter which, when set, allows the buffer to pass through the free list search unscathed (the counter is decremented each time it is examined). The counter _s_t_k_y indicated these events. Note that all event counters are given as events per second since the display was last updated. PPPPaaaaggggeeee 3333 bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) The current time is also shown, as well as the current system clock tick value. Note that all event counters are labeled with names that contain no upper-case letters, and that all memory values are labeled with names that contain an upper-case 'M'. With memory values, a 'K' represents 1024 bytes, an 'M' is 1024 K and so on. Buffer counters are given as decimal values, and their labels all start with upper-case characters. DDDDIIIISSSSPPPPLLLLAAAAYYYY OOOORRRRDDDDEEEERRRR The display sort order and any pruning flags are also displayed. The sort order determines in what order buffers are to be displayed; and pruning flags, if specified, indicated that _b_u_f_v_i_e_w should only display buffers with the indicated flags set. The following sort keys can be specified: mmmm display the files with the most buffers attached llll display the files with the least buffers attached bbbb display the biggest buffers first ssss display the smallest buffers first nnnn display the newest buffers first oooo display the oldest buffers first Note that _b_u_f_v_i_e_w can be in either aggregate mode or itemized mode. When in aggregate mode, all files (for regular file data) or devices (for system data) that are currently using buffers are represented as a single buffer; in itemized mode, individual buffers are presented. By default, _b_u_f_v_i_e_w runs in aggregate mode and sorts using _m and _b as the sort keys. The display order can be changed, either interactively or as a command-line option. Either way, the last order specifier given becomes the first sort key. If any pruning flags are requested, only those buffers which have the corresponding flags set will be displayed. The following pruning flags can be specified: ddddwwww display delayed write buffers bbbbssssyyyy display in-use (busy) buffers aaaassss display buffers being used for asynchronous reads/writes nnnnaaaa display NFS buffers being used for async reads/writes ddddaaaa display buffers without allocated backing-store nnnncccc display NFS3 buffers without committed backing-store sssswwwwpppp display buffers being used to swap user pages iiiinnnnaaaacccctttt display inactive buffers iiiinnnnoooo display inode buffers iiiinnnnoooommmmaaaapppp display inode map buffers ddddiiiirrrr____bbbbtttt display buffers containing directory btrees mmmmaaaapppp display buffers containing maps aaaattttttttrrrr____bbbbtttt display attribute btree buffers aaaaggggiiii display buffers containing AG header (inode allocation) aaaaggggffff display allocation group header buffers aaaaggggffffllll display allocation group free block array buffers PPPPaaaaggggeeee 4444 bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) ddddqqqquuuuooootttt display quota buffers containing dquot structures These, too, can be specified as command-line options or demanded interactively. Further, pruning flags can be removed (wholesale) with the FFFF interactive command. If a display order or flag specifier is given that is incompatible with the current mode, the mode changes and any incompatible sort or display directives are removed. For example, the _n display order and all pruning flags are incompatible with aggregate mode; if any of these are specified, _m or _l will be removed as a sort key. Similarly, if either _m and _l are demanded, _b_u_f_v_i_e_w will convert to aggregate mode, and any pruning flags or itemized sort keys will be deleted. TTTTHHHHEEEE DDDDIIIISSSSPPPPLLLLAAAAYYYY The information displayed about buffers changes depending whether _b_u_f_v_i_e_w is in aggregate mode or itemized mode. In either mode, the internal node number of the file is displayed under the column _V_N_U_M_B_E_R for data buffers, or listed simply as a 'system' file if the buffer represents a meta-data buffer. In aggregate mode, the next column is _N_A_M_E. Only data file names are given, and only those whose names are brief enough to be included in the system's internal directory name cache (currently 31 bytes). The names displayed by _b_u_f_v_i_e_w are truncated. A file whose name is too large to fit in the name cache is displayed as '?'; if the system cannot determine the name of the file because it would have had to sleep waiting for an internal lock, the file names is displayed as '??'. In itemized mode the column _N_A_M_E/_R_E_F shows either the (possibly truncated) file name or, for meta-data buffers, a pseudo-reference counter which, if non-zero, allows a buffer a free trip though the buffer free list. The column _D_E_V_I_C_E gives the last component(s) of the file system path name of the device from which the file system for the given buffer's file is mounted. The column _F_S_T_Y_P gives an indication of the type of file system that is being managed by the buffer. In aggregate mode, the next column is _N_B_U_F, which is the number of buffers currently holding data or meta-data for the particular file or file system, respectively. The aggregate buffer size and the amount of buffer memory which is delayed-write is shown as _S_I_Z_E and _D_E_L_W_R_I. (Delayed write means that the buffer has been altered but the new contents have not yet been written to backing store.) The final two columns in aggregate mode, _L_O_W and _H_I_G_H, represent the lowest and highest bytes represented by the buffers mapping the object. For data buffers, they refer to logical offsets within the file; for meta-data buffers, offsets within the file system. PPPPaaaaggggeeee 5555 bbbbuuuuffffvvvviiiieeeewwww((((1111)))) bbbbuuuuffffvvvviiiieeeewwww((((1111)))) In itemized mode, the index of the particular buffer in the system's buffer array is given as _B_U_F. Its size is given next as _S_I_Z_E, and _O_F_F_S_E_T the offset within the file or file system of the first byte mapped by the buffer. The column _A_G_E shows the clock tick stored in the buffer. This value is set when the buffer is first created and reset whenever the buffer is accessed or modified. Lastly, interesting buffer flags are shown under _F_L_A_G_S. The list of flags which might be displayed are exactly those which can be specified as display pruning flags. FFFFIIIILLLLEEEESSSS /etc/mtab list of mounted file systems BBBBUUUUGGGGSSSS The buffer cache notion of a device number does not match that of the mounted file system for NFS file systems, so the device number, not its name, is displayed. SSSSEEEEEEEE AAAALLLLSSSSOOOO _t_o_p(1), _o_s_v_i_e_w(1) PPPPaaaaggggeeee 6666